1. Field of the Invention
The present invention relates to an image processing apparatus and a method for controlling the same, and in particular relates to an image forming apparatus that applies a non-linear conversion to an image to improve image quality, and a method for controlling the same.
2. Description of the Related Art
It is known that gamma correction is performed in order to adjust tone in a captured image in a conventional digital still camera, digital video camera, or the like. Gamma correction is non-linear conversion that is performed with respect to the luminance of a captured image, and a non-linear conversion characteristic is also referred to as a gamma characteristic, a gamma curve, or the like.
By correcting a gamma characteristic in accordance with the features of an image, it is possible to restrain blown-out highlights and blocked-up shadows in an image. Japanese Patent Laid-Open No. 2007-201655 discloses that the occurrence of blown-out highlights that appear when a reference gamma characteristic is applied is predicted based on the ratio of frequencies in four equal regions of an image density (luminance) histogram, and the reference gamma characteristic is corrected such that blown-out highlights are restrained.
Japanese Patent Laid Open No. 2007-201655 also discloses that if, based on the average density of a face region, it is predicted that an unpleasant influence will appear in the image quality of the face region when the corrected reference gamma characteristic is applied, the gamma characteristic is further corrected in order to avoid the unpleasant influence.
Since a face is not a flat region, with general shooting conditions in which light comes from an oblique direction with respect to the face, there is a difference between light and dark parts in the face region and the difference between light and dark parts varies according to the positional relationship between the face and the light source, the intensity of the light source, and the like. However, in Japanese Patent Laid-Open No. 2007-201655, no correction or setting of a gamma characteristic that gives consideration to the difference between light and dark regions in a face region is considered, and the post-correction gamma characteristic may not necessarily be appropriate for the image quality of the face region.